<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/11/6
 * Time: 10:22
 */

namespace app\admin\validate\user;


use think\Validate;

class UserExperts extends Validate
{

    /**
     * 验证规则
     *
     */
    protected $rule = [
        'age'=>'require|alphaNum|between:0,100',
        'practitioner_year'=>'require|alphaNum|between:0,100',
        'card_front'=>'require|alphaNum',
        'card_verso'=>'require|alphaNum'
    ];

    /**
     * 提示消息
     *
     **/
    protected $message = [
        'age.require'=>'年龄必须输入',
        'age.alphaNum'=>'年龄必须为数字',
        'age.between'=>'年龄在0 - 100 之间',
        'practitioner_year.require'=>'工作年限必须输入',
        'practitioner_year.alphaNum'=>'工作年限必须为数字',
        'practitioner_year.between'=>'工作年限0 - 100 之间',
        'card_front.require'=>'身份证必须上传',
        'card_verso.require'=>'身份证必须上传'
    ];

    protected $scene = ['edit'=>['age','practitioner_year']];

}